package com.lc202310;

/**
 * Description:
 *
 * @Create 2023/10/12 20:36
 * @Version 1.0
 */
public class Solution2562 {
    public long findTheArrayConcVal(int[] nums) {
        long res = 0;
        int start = 0;
        int end = nums.length - 1;
        while (start <= end) {
            if (start == end) {
                return res + nums[start];
            }
            res += Integer.parseInt("" + nums[start] + nums[end]);
            start++;
            end--;
        }
        return res;
    }
}
